package main
import "fmt"
import "time"

func isPrime(num int) {
	var flag = false
	for j := 2; j < num; j++ {
		if num % j == 0 {
			flag = true
			break
		}
	}
	if !flag {
		fmt.Printf("%v 是素数\n", num)
	}
}
func main() {
	var startTime = time.Now()
	for i := 1; i < 1000000; i++ {
		isPrime(i)
	}
	var runTime = time.Since(startTime)
	fmt.Println("程序运行时间：", runTime)
}